#include <iostream>
#include <vector>

using namespace std;

void quick_sort(vector<int> &vec,int low,int high)
{
    if(low >= high)
        return;
    int left = low;
    int right = high;
    int key = vec[left];
    while(left < right)
    {
        while(left < right && vec[right] >= key)
            right--;
        if(left < right)
            vec[left++] = vec[right];
        while(left < right && vec[left] < key)
            left++;
        if(left < right)
            vec[right--] = vec[left];
    }
    vec[right] = key;

    quick_sort(vec,low,right - 1);
    quick_sort(vec,right + 1,high);
}

int main()
{
    int num;
    cin >> num;

    vector<int> vec;
    int temp;

    for(int i = 0; i < num; ++i)
    {
                cin >> temp;
                        vec.push_back(temp);
                            
    }
    quick_sort(vec,0,num-1);

    for(vector<int>::iterator it = vec.begin(); it != vec.end(); ++it)
    {
        cout << *it << " ";
    }
    cout << endl ;

    return 0;
}
